<!DOCTYPE html>
<html th:replace="~{layouts/layout :: layout(~{::title}, ~{::#main_content})}" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>管理系统</title>
</head>
<body>
<div id="main_content">
    <h5>语言包 resource/message.properties 中定义
        <p th:text="#{home.welcome}">Welcome to our grocery store!</p>
    </h5>

    <h5>当前路径：<span th:text="${#request.getServletPath()}"></span></h5>
    <h5>querystring：<span th:text="${#request.getQueryString()}"></span></h5>

    <div>getScheme()获取协议，getServerName()获取服务器名，getServerPort()服务器端口，getContextPath() APP根路径</div>
    <a th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()  + #request.getContextPath() + '/'} "
       id="contextPath">aaaa</a>

    <h5>循环列表</h5>
    <div th:each="user : ${userList}">
        <div th:text="${user}"></div>
    </div>

</div>
</body>
</html>